home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / beebe / updates / 00mail.6 < prev    next >
Text File  |  1990-10-01  |  5KB  |  129 lines

  1.  4-Mar-87 18:29:46-MST,5297;000000000000
  2. Mail-From: BEEBE created at  4-Mar-87 18:29:43
  3. Date: Wed 4 Mar 87 18:29:43-MST
  4. From: "Nelson H.F. Beebe" <Beebe@UTAH-SCIENCE.ARPA>
  5. Subject: DVI driver update #6
  6. To: $90%dhdurz1.bitnet@WISCVM.WISC.EDU, AustinS%ucbcmsa.edu@UTAH-CS.ARPA,
  7.     Berg-lists%gsb-why@SCORE.STANFORD.EDU, CEL@CITHEX.CALTECH.EDU,
  8.     Celoni@SCORE.STANFORD.EDU, Crawford-J%ohio-state.arpa@UTAH-CS.ARPA,
  9.     CRM8701%tamvenus.bitnet@WISCVM.WISC.EDU,
  10.     Dan%buchmd.bu-cs.arpa@UTAH-CS.ARPA, David%ci-dandelion.uucp@EDDIE.MIT.EDU,
  11.     Gaspard%hroeur5.bitnet@WISCVM.WISC.EDU,
  12.     Goodall%admin.okanagan.bcc.cdn@RELAY.CS.NET,
  13.     James%vaxe.coe.northeastern.edu@UTAH-CS.ARPA,
  14.     JRP%nplpsg.uucp@UTAH-CS.ARPA, Karney%ppc.mfenet@NMFECC.ARPA,
  15.     Lamy%ai.toronto.edu@RELAY.CS.NET, MPC91B%dgogwd01.bitnet@WISCVM.WISC.EDU,
  16.     RJones%uwovax.bitnet@WISCVM.WISC.EDU, RS%gnome.cs.cmu.edu@UTAH-CS.ARPA,
  17.     Simon%m_scrvx2%slb-test.csnet.csnet-relay@CSNET-RELAY.ARPA,
  18.     Stone%ruthep.rutgers.edu@RUTGERS.RUTGERS.EDU,
  19.     System%uvphys.bitnet@WISCVM.WISC.EDU, Thobe@EE.UCLA.EDU,
  20.     X854%ddagsi3.bitnet@WISCVM.WISC.EDU, Zeffi%finabo.bitnet@WISCVM.WISC.EDU
  21. cc: beebe@UTAH-SCIENCE.ARPA
  22. X-US-Mail: "Center for Scientific Computation, South Physics, University of Utah, Salt Lake City, UT 84112"
  23. X-Telephone: (801) 581-5254
  24. Message-ID: <12283822029.27.BEEBE@UTAH-SCIENCE.ARPA>
  25.  
  26. A couple  of years  ago,  I spent  some time  debugging  the
  27. DVIxxx drivers  under  Eunice  (Wollongong's  4.1  BSD  Unix
  28. underneath VAX  VMS),  trying  to determine  why  they  core
  29. dumped  after  completing  successfully.   The  problem  was
  30. reported again from a 4.2 Eunice site, and last week from  a
  31. 4.2 BSD Unix VAX site.  It  does not occur in 4.3BSD, or  in
  32. HPUX, or any other non-Unix  system in which the family  has
  33. been implemented.  Stepping with the debugger, I found  that
  34. the program would run successfully  right up to the call  to
  35. exit() in abortrun.h, then die  after it entered exit().   I
  36. hit the problem again today on  a 4.2 BSD Unix system on  an
  37. Integrated Solutions machine, and can now report a solution.
  38. The report last week from Los Angeles pointed the finger  at
  39. fclose(), and indeed,  if each call  to fclose() makes  sure
  40. not to make the call if  the file pointer is null, the  core
  41. dumps  no  longer  happen.   Two  modules,  abortrun.h   and
  42. dviterm.h are  affected,  and  a VAX  VMS  DIFF  listing  is
  43. appended to this note.  This is definitely a bug in 4.1  and
  44. 4.2  Unix,  not  the  DVI  drivers,  but  a  workaround   is
  45. necessary.  The man page (man 3s fclose) states
  46.  
  47.     These  routines  return   EOF  if   stream  is   not
  48.     associated with an output file, or if buffered  data
  49.     cannot be transferred to that file.
  50.  
  51. There is no mention of a subsequent core dump!
  52.  
  53. I hit a second problem  on the Integrated Solutions  system:
  54. the global  variable  errno  is  not  defined  in  the  file
  55. errno.h;  it  is  under  VAX  VMS  and  TOPS-20.   dvihead.h
  56. therefore needs a change too for these systems.  It must  be
  57. inside a conditional, because in the coming ANSI C standard,
  58. errno will be defined as a macro in stddef.h, which will not
  59. necessarily expand to an extern int.  Why it is not  defined
  60. in errno.h is a mystery, since errno is unlikely to be  used
  61. without errno.h to get definitions of error symbols.
  62.  
  63. diff abortrun.h
  64. ************
  65. File SYS$LIBROOT:[PLOT79.TEX.DVI]ABORTRUN.H;5
  66.    21       if (font_files[k].font_id != (FILE*)NULL)
  67.    22           (void)fclose(font_files[k].font_id);
  68.    23   
  69.    24       if (dvifp != (FILE*)NULL)
  70.    25           (void)fclose(dvifp);
  71.    26       if (plotfp != (FILE*)NULL)
  72.    27           (void)fclose(plotfp);
  73.    28       if (g_dolog && (g_logfp != (FILE *)NULL))
  74. ******
  75. File SYS$LIBROOT:[PLOT79.TEX.DVI]ABORTRUN.H;4
  76.    21           (void)fclose(font_files[k].font_id);
  77.    22   
  78.    23       (void)fclose(dvifp);
  79.    24       (void)fclose(plotfp);
  80.    25       if (g_dolog && (g_logfp != (FILE *)NULL))
  81. ************
  82.  
  83. Number of difference sections found: 1
  84. Number of difference records found: 7
  85.  
  86. DIFFERENCES /IGNORE=()/MERGED=1-
  87.     SYS$LIBROOT:[PLOT79.TEX.DVI]ABORTRUN.H;5-
  88.     SYS$LIBROOT:[PLOT79.TEX.DVI]ABORTRUN.H;4
  89. diff dvihead.h
  90. ************
  91. File SYS$LIBROOT:[PLOT79.TEX.DVI]DVIHEAD.H;8
  92.   338   #if (BSD41 | BSD42)
  93.   339   extern int errno;        /* not in all errno.h files, sigh... */
  94.   340   #endif
  95.   341   
  96. ******
  97. File SYS$LIBROOT:[PLOT79.TEX.DVI]DVIHEAD.H;7
  98.   338   
  99. ************
  100.  
  101. Number of difference sections found: 1
  102. Number of difference records found: 3
  103.  
  104. DIFFERENCES /IGNORE=()/MERGED=1-
  105.     SYS$LIBROOT:[PLOT79.TEX.DVI]DVIHEAD.H;8-
  106.     SYS$LIBROOT:[PLOT79.TEX.DVI]DVIHEAD.H;7
  107. diff dviterm.h
  108. ************
  109. File SYS$LIBROOT:[PLOT79.TEX.DVI]DVITERM.H;10
  110.    30       if (dvifp != (FILE*)NULL)
  111.    31           (void)fclose(dvifp);
  112.    32       if (plotfp != (FILE*)NULL)
  113.    33           (void)fclose(plotfp);
  114.    34   
  115. ******
  116. File SYS$LIBROOT:[PLOT79.TEX.DVI]DVITERM.H;9
  117.    30       (void)fclose(dvifp);
  118.    31       (void)fclose(plotfp);
  119.    32   
  120. ************
  121.  
  122. Number of difference sections found: 1
  123. Number of difference records found: 4
  124.  
  125. DIFFERENCES /IGNORE=()/MERGED=1-
  126.     SYS$LIBROOT:[PLOT79.TEX.DVI]DVITERM.H;10-
  127.     SYS$LIBROOT:[PLOT79.TEX.DVI]DVITERM.H;9
  128. -------
  129.